<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			const token = uni.getStorageSync('token')
			if (!token) {
				uni.reLaunch({
					url: '/pages/login/login'
				})
			}
		},
		onShow: function() {
			console.log('App Show')
			// const authDegree = uni.getStorageSync('userinfo').authDegree;
			// console.log("authDegree", authDegree);
			// const tabList = authDegree == 1 ?
			//  ['/pages/evaluationReaults/evaluationReaults', '/pages/intensiveTraining/intensiveTraining', '/pages/systemManage/systemManage'] : 
			//  ['/pages/evaluationReaults/evaluationReaults','/pages/intensiveTraining/intensiveTraining'];
			//  console.log("tabList",tabList);
			// // 动态隐藏不符合权限的tab  
			// const currentPages = getCurrentPages();
			// if (!currentPages.some(page => tabList.includes(page.route))) {
			// 	uni.switchTab({
			// 		url: `${tabList[0]}`
			// 	});
			// }
			// // 原生TabBar无法删除项，但可以通过页面路由控制  
			// uni.hideTabBar({
			// 	animation: false,
			// 	success: () => {
			// 		console.log("success tabList",tabList);
			// 		tabList.forEach(path => uni.showTabBar({						
			// 			pagePath: path
			// 		}));
			// 	}
			// });

		},
		onHide: function() {
			console.log('App Hide')
		},

	}
</script>

<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-ui/index.scss";

	.layout-center {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.layout-between {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.layout-between-start {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
	}

	.layout-around {
		display: flex;
		align-items: center;
		justify-content: space-around;
	}

	.layout-start {
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}

	.layout-end {
		display: flex;
		align-items: center;
		justify-content: flex-end;
	}

	.layout-column-between {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		align-items: center;
	}

	.layout-column-center {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
</style>